package cqut.wys.proxy;

import java.util.ArrayList;
import java.util.List;

/**
 * --------神兽出没--------/
 *   ┌─┐     ┌─┐
 * ┌─┘─┴─────┘─┴─┐
 * │      ─      │
 * │  ┬─┘   └─┬  │
 * │             │
 * │      ┴      │  Code is far away from bug with the animal protecting
 * └───┐      ┌──┘  神兽保佑,代码无bug
 *     │      │
 *     │      └──────┐
 *     │             ├┐
 *     │             ┌┘
 *     └┐ ┐ ┌───┬─┐ ┌┘
 *      │ ┤ ┤   │ ┤ ┤
 *      └─┴─┘   └─┴─┘
 * --------感觉萌萌哒--------/
 *
 * HelloService接口实现
 * @author wuyoushan
 * @date 2018/5/18
 */
public class HelloServiceImpl implements HelloService {

    @Override
    public void say(String msg) {
        System.out.println("say()方法:"+msg);
    }

    @Override
    public String echo(String msg) {
        return "echo()方法:"+msg;
    }

    @Override
    public String[] getHobbies() {
        return new String[]{"string[]1","string[]2"};
    }

    @Override
    public int insert(User user) {
        System.out.println("传入的对象为:"+user);
        return 0;
    }

    @Override
    public User getUser() {
        User user = new User();
        user.setUserId(11);
        user.setUserName("可以");
        return user;
    }

    @Override
    public List<User> getUser(String group, int age) {
        User user = new User();
        user.setUserId(11);
        user.setUserName("23333");
        List<User> list = new ArrayList<>(5);
        list.add(user);
        return list;
    }
}
